"git2 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git)",
- "log 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"registry 0.1.0",
- "rustc-serialize 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "semver 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "semver 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
"tar 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "term 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "term 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
- "toml 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "toml 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "curl-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl-sys 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "curl-sys"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
+ "libc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"regex 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
[[package]]
name = "gcc"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
version = "0.1.0"
source = "git+https://github.com/carllerche/hamcrest-rust.git#445dc78024c7d912d2e52dcd3ef3dfe2c8dbab47"
+[[package]]
+name = "kernel32-sys"
+version = "0.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "libc"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "libgit2-sys"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libssh2-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libssh2-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
[[package]]
name = "libssh2-sys"
-version = "0.1.2"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libz-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "pkg-config 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "log"
-version = "0.1.9"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"regex 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "gcc 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gcc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libressl-pnacl-sys 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "pkg-config"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
version = "0.1.0"
dependencies = [
"curl 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rustc-serialize"
-version = "0.2.8"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "semver"
-version = "0.1.12"
+version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
[[package]]
name = "term"
-version = "0.1.8"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "log 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "kernel32-sys 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "gcc 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gcc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "toml"
-version = "0.1.13"
+version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "rustc-serialize 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
use util::CargoResult;
/// Informations about a dependency requested by a Cargo manifest.
-#[derive(PartialEq,Clone,Show)]
+#[derive(PartialEq,Clone,Debug)]
pub struct Dependency {
name: String,
source_id: SourceId,
only_for_platform: Option<String>,
}
-#[derive(PartialEq, Clone, Show, Copy)]
+#[derive(PartialEq, Clone, Debug, Copy)]
pub enum Kind {
Normal,
Development,
use util::{CargoResult, human};
/// Contains all the informations about a package, as loaded from a Cargo.toml.
-#[derive(PartialEq,Clone, Show)]
+#[derive(PartialEq,Clone, Debug)]
pub struct Manifest {
summary: Summary,
targets: Vec<Target>,
/// validated by cargo itself, but rather it is up to the registry when uploaded
/// to validate these fields. Cargo will itself accept any valid TOML
/// specification for these values.
-#[derive(PartialEq, Clone, Show)]
+#[derive(PartialEq, Clone, Debug)]
pub struct ManifestMetadata {
pub authors: Vec<String>,
pub keywords: Vec<String>,
}
}
-#[derive(Show, Clone, PartialEq, Hash, RustcEncodable, Copy)]
+#[derive(Debug, Clone, PartialEq, Hash, RustcEncodable, Copy)]
pub enum LibKind {
Lib,
Rlib,
}
}
-#[derive(Show, Clone, Hash, PartialEq, RustcEncodable)]
+#[derive(Debug, Clone, Hash, PartialEq, RustcEncodable)]
pub enum TargetKind {
Lib(Vec<LibKind>),
Bin,
Example,
}
-#[derive(RustcEncodable, RustcDecodable, Clone, PartialEq, Show)]
+#[derive(RustcEncodable, RustcDecodable, Clone, PartialEq, Debug)]
pub struct Profile {
env: String, // compile, test, dev, bench, etc.
opt_level: u32,
}
/// Informations about a binary, a library, an example, etc. that is part of the package.
-#[derive(Clone, Hash, PartialEq, Show)]
+#[derive(Clone, Hash, PartialEq, Debug)]
pub struct Target {
kind: TargetKind,
name: String,
///
/// A package is a `Cargo.toml` file, plus all the files that are part of it.
// TODO: Is manifest_path a relic?
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct Package {
// The package's manifest
manifest: Manifest,
}
}
-impl fmt::String for Package {
+impl fmt::Display for Package {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.get_summary().get_package_id())
}
}
}
-#[derive(PartialEq,Clone,Show)]
+#[derive(PartialEq,Clone,Debug)]
pub struct PackageSet {
packages: Vec<Package>,
}
use core::source::SourceId;
/// Identifier for a specific version of a package in a specific source.
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct PackageId {
inner: Arc<PackageIdInner>,
}
-#[derive(PartialEq, PartialOrd, Eq, Ord, Show)]
+#[derive(PartialEq, PartialOrd, Eq, Ord, Debug)]
struct PackageIdInner {
name: String,
version: semver::Version,
}
}
-#[derive(Clone, Show, PartialEq)]
+#[derive(Clone, Debug, PartialEq)]
pub enum PackageIdError {
InvalidVersion(String),
InvalidNamespace(String)
fn from_error(t: PackageIdError) -> Box<CargoError> { Box::new(t) }
}
-#[derive(PartialEq, Hash, Clone, RustcEncodable, Show)]
+#[derive(PartialEq, Hash, Clone, RustcEncodable, Debug)]
pub struct Metadata {
pub metadata: String,
pub extra_filename: String
}
}
-impl fmt::String for PackageId {
+impl fmt::Display for PackageId {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
try!(write!(f, "{} v{}", self.inner.name, self.inner.version));
use core::PackageId;
use util::{CargoResult, ToUrl, human, ToSemver, ChainError};
-#[derive(Clone, PartialEq, Eq, Show)]
+#[derive(Clone, PartialEq, Eq, Debug)]
pub struct PackageIdSpec {
name: String,
version: Option<Version>,
}
-impl fmt::String for PackageIdSpec {
+impl fmt::Display for PackageIdSpec {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let mut printed_name = false;
match self.url {
use super::Resolve;
-#[derive(RustcEncodable, RustcDecodable, Show)]
+#[derive(RustcEncodable, RustcDecodable, Debug)]
pub struct EncodableResolve {
package: Option<Vec<EncodableDependency>>,
root: EncodableDependency,
}
}
-#[derive(RustcEncodable, RustcDecodable, Show, PartialOrd, Ord, PartialEq, Eq)]
+#[derive(RustcEncodable, RustcDecodable, Debug, PartialOrd, Ord, PartialEq, Eq)]
pub struct EncodableDependency {
name: String,
version: String,
}
}
-#[derive(Show, PartialOrd, Ord, PartialEq, Eq)]
+#[derive(Debug, PartialOrd, Ord, PartialEq, Eq)]
pub struct EncodablePackageId {
name: String,
version: String,
}
}
-impl fmt::Show for Resolve {
+impl fmt::Debug for Resolve {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
self.graph.fmt(fmt)
}
}
pub fn status<T, U>(&mut self, status: T, message: U) -> IoResult<()>
- where T: fmt::String, U: fmt::String
+ where T: fmt::Display, U: fmt::Display
{
self.out().say_status(status, message, GREEN)
}
pub fn say_status<T, U>(&mut self, status: T, message: U, color: Color)
-> IoResult<()>
- where T: fmt::String, U: fmt::String
+ where T: fmt::Display, U: fmt::Display
{
try!(self.reset());
if color != BLACK { try!(self.fg(color)); }
fn fingerprint(&self, pkg: &Package) -> CargoResult<String>;
}
-#[derive(Show, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
+#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
enum Kind {
/// Kind::Git(<git reference>) represents a git repository
Git(GitReference),
Registry,
}
-#[derive(Show, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
+#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum GitReference {
Tag(String),
Branch(String),
type Error = Box<CargoError + Send>;
/// Unique identifier for a source of packages.
-#[derive(Clone, Eq, Show)]
+#[derive(Clone, Eq, Debug)]
pub struct SourceId {
inner: Arc<SourceIdInner>,
}
-#[derive(Eq, Clone, Show)]
+#[derive(Eq, Clone, Debug)]
struct SourceIdInner {
url: Url,
kind: Kind,
}
}
-impl fmt::String for SourceId {
+impl fmt::Display for SourceId {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match *self.inner {
SourceIdInner { kind: Kind::Path, ref url, .. } => {
- fmt::String::fmt(url, f)
+ fmt::Display::fmt(url, f)
}
SourceIdInner { kind: Kind::Git(ref reference), ref url,
ref precise, .. } => {
/// a package.
///
/// Summaries are cloned, and should not be mutated after creation
-#[derive(Show,Clone)]
+#[derive(Debug,Clone)]
pub struct Summary {
package_id: PackageId,
dependencies: Vec<Dependency>,
use util::{GitRepo, HgRepo, CargoResult, human, ChainError, internal};
use util::Config;
-#[derive(Copy, Show, PartialEq)]
+#[derive(Copy, Debug, PartialEq)]
pub enum VersionControl { Git, Hg, NoVcs }
pub struct NewOptions<'a> {
use super::custom_build::BuildState;
use super::{ProcessEngine, ExecEngine};
-#[derive(Show, Copy)]
+#[derive(Debug, Copy)]
pub enum Platform {
Target,
Plugin,
use util::Freshness;
/// Contains the parsed output of a custom build script.
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct BuildOutput {
/// Paths to pass to rustc with the `-L` flag
pub library_paths: Vec<Path>,
}
}
-impl fmt::String for CommandPrototype {
+impl fmt::Display for CommandPrototype {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self.ty {
CommandType::Rustc => try!(write!(f, "`rustc")),
}
}
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub enum CommandType {
Rustc,
Rustdoc,
///
/// Each build step for a package is registered with one of these stages, and
/// each stage has a vector of work to perform in parallel.
-#[derive(Hash, PartialEq, Eq, Clone, PartialOrd, Ord, Show, Copy)]
+#[derive(Hash, PartialEq, Eq, Clone, PartialOrd, Ord, Debug, Copy)]
pub enum Stage {
Start,
BuildCustomBuild,
mod layout;
mod links;
-#[derive(PartialEq, Eq, Hash, Show, Copy)]
+#[derive(PartialEq, Eq, Hash, Debug, Copy)]
pub enum Kind { Host, Target }
#[derive(Default, Clone)]
-use std::fmt::{self, Show, Formatter};
+use std::fmt::{self, Debug, Formatter};
use std::hash::{Hash, Hasher, SipHasher};
use std::mem;
use url::{self, Url};
return url;
}
-impl<'a, 'b> Show for GitSource<'a, 'b> {
+impl<'a, 'b> Debug for GitSource<'a, 'b> {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
try!(write!(f, "git repo at {}", self.remote.get_url()));
use core::GitReference;
use util::{CargoResult, ChainError, human, ToUrl, internal};
-#[derive(PartialEq, Clone, Show)]
+#[derive(PartialEq, Clone, Debug)]
#[allow(missing_copy_implementations)]
pub struct GitRevision(git2::Oid);
-impl fmt::String for GitRevision {
+impl fmt::Display for GitRevision {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
- fmt::String::fmt(&self.0, f)
+ fmt::Display::fmt(&self.0, f)
}
}
/// GitRemote represents a remote repository. It gets cloned into a local
/// GitDatabase.
-#[derive(PartialEq,Clone,Show)]
+#[derive(PartialEq,Clone,Debug)]
pub struct GitRemote {
url: Url,
}
use std::cmp;
-use std::fmt::{self, Show, Formatter};
+use std::fmt::{self, Debug, Formatter};
use std::io::fs::{self, PathExtensions};
use glob::Pattern;
use git2;
}
}
-impl<'a, 'b> Show for PathSource<'a, 'b> {
+impl<'a, 'b> Debug for PathSource<'a, 'b> {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
write!(f, "the paths source")
}
Boolean(bool, Path),
}
-impl fmt::Show for ConfigValue {
+impl fmt::Debug for ConfigValue {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CV::Integer(i, ref path) => write!(f, "{} (from {:?})", i, path),
///
/// A fresh package does not necessarily need to be rebuilt (unless a dependency
/// was also rebuilt), and a dirty package must always be rebuilt.
-#[derive(PartialEq, Eq, Show, Copy)]
+#[derive(PartialEq, Eq, Debug, Copy)]
pub enum Freshness {
Fresh,
Dirty,
fn cargo_cause(&self) -> Option<&CargoError>{ None }
}
-impl fmt::String for Box<CargoError> {
+impl fmt::Display for Box<CargoError> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
try!(write!(f, "{}", self.description()));
Ok(())
}
}
-impl fmt::Show for Box<CargoError> {
+impl fmt::Debug for Box<CargoError> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- fmt::String::fmt(self, f)
+ fmt::Display::fmt(self, f)
}
}
}
}
-impl fmt::String for ProcessError {
+impl fmt::Display for ProcessError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- fmt::String::fmt(&self.desc, f)
+ fmt::Display::fmt(&self.desc, f)
}
}
-impl fmt::Show for ProcessError {
+impl fmt::Debug for ProcessError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- fmt::String::fmt(self, f)
+ fmt::Display::fmt(self, f)
}
}
is_human: bool,
}
-impl fmt::String for ConcreteCargoError {
+impl fmt::Display for ConcreteCargoError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description)
}
}
-impl fmt::Show for ConcreteCargoError {
+impl fmt::Debug for ConcreteCargoError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- fmt::String::fmt(self, f)
+ fmt::Display::fmt(self, f)
}
}
pub type CliResult<T> = Result<T, CliError>;
-#[derive(Show)]
+#[derive(Debug)]
pub struct CliError {
pub error: Box<CargoError>,
pub unknown: bool,
})
}
-pub fn internal<S: fmt::String>(error: S) -> Box<CargoError> {
+pub fn internal<S: fmt::Display>(error: S) -> Box<CargoError> {
Box::new(ConcreteCargoError {
description: error.to_string(),
detail: None,
})
}
-pub fn human<S: fmt::String>(error: S) -> Box<CargoError> {
+pub fn human<S: fmt::Display>(error: S) -> Box<CargoError> {
Box::new(ConcreteCargoError {
description: error.to_string(),
detail: None,
})
}
-pub fn caused_human<S: fmt::String, E: Error>(error: S, cause: E) -> Box<CargoError> {
+pub fn caused_human<S: fmt::Display, E: Error>(error: S, cause: E) -> Box<CargoError> {
Box::new(ConcreteCargoError {
description: error.to_string(),
detail: None,
}
}
-impl<N: fmt::Show + Eq + Hash<Hasher>> fmt::Show for Graph<N> {
+impl<N: fmt::Debug + Eq + Hash<Hasher>> fmt::Debug for Graph<N> {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
try!(writeln!(fmt, "Graph {{"));
use util::{CargoResult, ProcessError, process_error};
-#[derive(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Debug)]
pub struct ProcessBuilder {
program: CString,
args: Vec<CString>,
cwd: Path,
}
-impl fmt::String for ProcessBuilder {
+impl fmt::Display for ProcessBuilder {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
try!(write!(f, "`{}", String::from_utf8_lossy(self.program.as_bytes())));
fn enabled() -> bool { os::getenv("CARGO_PROFILE").is_some() }
-pub fn start<T: fmt::String>(desc: T) -> Profiler {
+pub fn start<T: fmt::Display>(desc: T) -> Profiler {
if !enabled() { return Profiler { desc: String::new() } }
PROFILE_STACK.with(|stack| stack.borrow_mut().push(time::precise_time_ns()));
Ok(())
}
-#[derive(RustcDecodable, Show, Clone)]
+#[derive(RustcDecodable, Debug, Clone)]
struct TomlTarget {
name: String,
crate_type: Option<Vec<String>>,
}
}
-impl fmt::Show for PathValue {
+impl fmt::Debug for PathValue {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PathValue::String(ref s) => s.fmt(f),
Ok(body)
}
-impl fmt::String for Error {
+impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
Error::NonUtf8Body => write!(f, "reponse body was not utf-8"),
fn with_err_msg(self, val: String) -> Result<T, String>;
}
-impl<T, E: fmt::String> ErrMsg<T> for Result<T, E> {
+impl<T, E: fmt::Display> ErrMsg<T> for Result<T, E> {
fn with_err_msg(self, val: String) -> Result<T, String> {
match self {
Ok(val) => Ok(val),
}
}
-impl fmt::String for Execs {
+impl fmt::Display for Execs {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "execs")
}
expected: String
}
-impl fmt::String for ShellWrites {
+impl fmt::Display for ShellWrites {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "`{}` written to the shell", self.expected)
}
}
}
-pub fn shell_writes<T: fmt::String>(string: T) -> ShellWrites {
+pub fn shell_writes<T: fmt::Display>(string: T) -> ShellWrites {
ShellWrites { expected: string.to_string() }
}